//
//  NISearchBar.h
//  VWCarNet
//
//  Created by navinfo air on 16/9/1.
//  Copyright © 2016年 navinfo. All rights reserved.
//


#import <UIKit/UIKit.h>
#import "UITextField+NavInfo.h"

@protocol NISearchBarDelegate <NSObject>

- (void)onSearch:(NSString *)keyword;
- (void)onBeginEditing;
- (void)onSearchCancel;
- (void)onSearchChange;
- (void)onSearchClear;

@end

@interface NISearchBar : UIView<UITextFieldDelegate>

@property(nonatomic,assign)BOOL disableEditing;
@property(nonatomic,assign)id<NISearchBarDelegate> delegate;

@property (strong, nonatomic) IBOutlet UIView *contentView;
- (void)setPlaceholder:(NSString *)text;
- (NSString *)getInputText;
-(void)hiddenKeyboard;
-(void)showKeyboard;
-(void)clearText;
-(void)setText:(NSString *)text;
-(void)showCancelBtnWithTitle:(NSString *)title;
-(void)hiddenCancelBtn;
@end
